package com.imooc.controller;

import com.imooc.properties.GirlProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 王怀楼
 * 2018-4-14 13：40
 */
@RestController
@RequestMapping("/hello")
public class HelloController {
    @Autowired
    private GirlProperties girlProperties;

   /* @RequestMapping(value = "/say/{id}",method = RequestMethod.GET)
    public String say(@PathVariable("id") Integer id){
        return "id:"+id;
        //return "cupSize:"+girlProperties.getCupSize()+",age:"+girlProperties.getAge();
        //return "index";
    }*/
//   @RequestMapping(value = "/say",method = RequestMethod.GET)
   @GetMapping(value="/say")
   public String say(@RequestParam(value="id",required =false,defaultValue = "0") Integer myId){
       return "id:"+myId;
       //return "cupSize:"+girlProperties.getCupSize()+",age:"+girlProperties.getAge();
       //return "index";
   }
}
